package com.zhouyu.util;

import com.zhouyu.service.User;

import java.beans.PropertyEditor;
import java.beans.PropertyEditorSupport;

/**
 * @ClassName:StringToUserPropertyEditor
 * @Auther: xierongchang
 * @Description:
 * @Date: 2024/6/16 11:31
 * @Version: v1.0.0
 */
public class StringToUserPropertyEditor extends PropertyEditorSupport implements PropertyEditor {

	@Override
	public void setAsText(String text) throws IllegalArgumentException {
		User user = new User();
		user.setName(text);
		this.setValue(user);
	}
}
